{extend name="ashippingmanagement/Public/base" /}
{block name="container"}
<style>
    .radio-inline input[type=radio] {
        margin-top: 4px
    }
</style>
<!-- 标题 -->
<div class="page-heade">
    <h1 class="title_color">非常规货补清单查询</h1>
</div>
<!-- 标题 -->
<div>
    <form id="form_id" action="" class="form-inline" method="post">
        <table class="row-margin-top tab-content table-bordered table" border="1">
            <tr>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">申请人：</label></td>
                <td><input type="text" class="form-control" name="b.em_name"
                           value="<?php if(isset($where['b_em_name'])) echo $where['b_em_name']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">申请编号：</label></td>
                <td><input type="text" class="form-control" name="a.sn"
                           value="<?php if(isset($where['a_sn'])) echo $where['a_sn']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">分区：</label></td>
                <td><input type="text" class="form-control" name="j.title"
                           value="<?php if(isset($where['j_title'])) echo $where['j_title']; ?>"></td>
            </tr>
            <tr>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">省份：</label></td>
                <td><input type="text" class="form-control" name="h.title"
                           value="<?php if(isset($where['h_title'])) echo $where['h_title']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">城市：</label></td>
                <td><input type="text" class="form-control" name="g.title"
                           value="<?php if(isset($where['g_title'])) echo $where['g_title']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">经销商：</label></td>
                <td><input type="text" class="form-control" name="e.title"
                           value="<?php if(isset($where['e_title'])) echo $where['e_title']; ?>"></td>
            </tr>
            <tr>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">网点：</label></td>
                <td><input type="text" class="form-control" name="f.title"
                           value="<?php if(isset($where['f_title'])) echo $where['f_title']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">物料编码：</label></td>
                <td><input type="text" class="form-control" name="o.material_no"
                           value="<?php if(isset($where['o_material_no'])) echo $where['o_material_no']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">物料名称：</label></td>
                <td><input type="text" class="form-control" name="o.material_name"
                           value="<?php if(isset($where['o_material_name'])) echo $where['o_material_name']; ?>"></td>
            </tr>
            <tr>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">物料类型：</label></td>
                <td>
                    <label class="radio-inline">
                        <input type="radio" name="c.kind" checked id="inlineRadio1" value="">全部
                    </label>
                    <label class="radio-inline">
                        <input type="radio" name="c.kind" <?php if(isset($where['c_kind']) && $where['c_kind'] == 1) echo 'checked'; ?> id="inlineRadio2" value="1">样品
                    </label>
                    <label class="radio-inline">
                        <input type="radio" name="c.kind" <?php if(isset($where['c_kind']) && $where['c_kind'] == 2) echo 'checked'; ?> id="inlineRadio3" value="2">物料
                    </label>
                </td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">收货方名称：</label></td>
                <td><input type="text" class="form-control" name="a.shr"
                           value="<?php if(isset($where['a_shr'])) echo $where['a_shr']; ?>"></td>
                <td style="min-width: 120px;width: 120px"></td>
                <td></td>
            </tr>
            <tr>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">是否已核销：</label></td>
                <td>
                    <label class="radio-inline">
                        <input type="radio" name="d.gdrq" checked id="dio1" value="option2">全部
                    </label>
                    <label class="radio-inline">
                        <input type="radio" name="d.gdrq" <?php if(isset($where['d_gdrq']) && $where['d_gdrq'] == 1) echo 'checked'; ?> id="dio2" value="1">是
                    </label>
                    <label class="radio-inline">
                        <input type="radio" name="d.gdrq" <?php if(isset($where['d_gdrq']) && $where['d_gdrq'] == 0) echo 'checked'; ?> id="dio3" value="0">否
                    </label>
                </td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">发货单号：</label></td>
                <td><input type="text" class="form-control" name=""></td>
                <td style="min-width: 120px;width: 120px"></td>
                <td></td>
            </tr>
            <tr>
                <td colspan="6" class="text-center">
                    <button class="btn btn-info query" type="submit">查询</button>
                    <button class="btn btn-info emptyIf" type="submit" onclick="$('#form_id').find('input').val('');">
                        清空查询条件
                    </button>
                    <button class="btn btn-info LendExcel" type="button"
                            onclick='window.open("/index/Ashippingmanagement/exportGoods","_self")'>导出Excel
                    </button>
                </td>
            </tr>
        </table>

        <table class="table row-margin-top table-bordered text-center bud_hei">
            <tr class="info">
                <th style="min-width:40px;width: 40px" class="text-center">No.</th>
                <th style="min-width:100px;" class="text-center">申请人</th>
                <th style="min-width:140px" class="text-center">申请编号</th>
                <th style="min-width:100px" class="text-center">分区</th>
                <th style="min-width:100px" class="text-center">省份</th>
                <th style="min-width:100px" class="text-center">城市</th>
                <th style="min-width:240px" class="text-center">经销商</th>
                <th style="min-width:200px" class="text-center">网点</th>
                <th style="min-width:100px" class="text-center">物料类型</th>
                <th style="min-width:240px" class="text-center">物料名称</th>
                <th style="min-width:140px" class="text-center">物料编码</th>
                <th style="min-width:100px" class="text-center">数量</th>
                <th style="min-width:100px" class="text-center">单位</th>
                <th style="min-width:100px" class="text-center">单价</th>
                <th style="min-width:100px" class="text-center">金额</th>
                <th style="min-width:240px" class="text-center">收货方名称</th>
                <th style="min-width:100px" class="text-center">是否已核销</th>
                <th style="min-width:140px" class="text-center">核销时间</th>
                <th style="min-width:140px" class="text-center">发货单号</th>
            </tr>
            <tbody>
            {volist name="data" id="list"}
            <tr>
                <td>{$i}</td>
                <td>{$list.em_name}</td>
                <td>{$list.sn}</td>
                <td>{$list.qu}</td>
                <td>{$list.sheng}</td>
                <td>{$list.shi}</td>
                <td>{$list.jxs}</td>
                <td>{$list.net}</td>
                <td>{$list.kind}</td>
                <td>{$list.wln}</td>
                <td>{$list.wlb}</td>
                <td class="text-right">{$list.num}</td>
                <td>{$list.unit}</td>
                <td class="text-right ObjectNum">{$list.prod_price}</td>
                <td class="text-right ObjectNum">{$list.prod_jine}</td>
                <td>{$list.shr}</td>
                <td>{$list.hexiao}</td>
                <td>{$list.gdrq}</td>
                <td>{$list.id}未知字段</td>
            </tr>
            {/volist}
            </tbody>
            <tfoot>
            <tr class="trTotal text-right font-bold">
                <td colspan="11">合计</td>
                <td>{$sumCount['num']}</td>
                <td></td>
                <td class="ObjectNum">{$sumCount['dj']}</td>
                <td class="ObjectNum">{$sumCount['ze']}</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
            </tfoot>
        </table>
        <h5 class="text-center">
            总共有{$sumCount['count']}条记录，第{$page}/{$maxpage}页，当前页：<input id="page" name="pages" type="text"
                                                                       style="width: 70px;" value=""
                                                                       class="form-control"/>
            <button id="gopage" style="height: 23px;">GO</button>&nbsp;&nbsp;<button type="submit" id="fistpage"
                                                                                     onclick="$('#form_id').find('input').val('');"
                                                                                     style="height: 23px;">首页
        </button>&nbsp;&nbsp; 每页显示
            <select id="pagesize" style="width: 70px" class="form-control select" name="limts">
                <option value='1'>1</option>
                <option value='5'>5</option>
                <option value='10'>10</option>
            </select>条
        </h5>
        <script>
            $('#pagesize').val("{$limit}");
        </script>
    </form>
</div>
<script>
    $(document).ready(function () {
        var $ObjectNum = $(".ObjectNum");
        toNum($ObjectNum);
    })
</script>
{/block}
